package cn.bjxy.javaks.store_ms.entity;

import java.util.Date;

/**
 * 封装货物的实体类
 * 
 * @author long
 *
 */
public class GoodsEntity {

	private String id;
	private String name;
	private Integer all_num;
	private Integer current_num;
	private String buyer_name;
	private String describe;
	private Date buy_date;
	private Date expire_date;
	private Date add_date;
	private Date modify_date;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getAll_num() {
		return all_num;
	}

	public void setAll_num(Integer all_num) {
		this.all_num = all_num;
	}

	public Integer getCurrent_num() {
		return current_num;
	}

	public void setCurrent_num(Integer crrent_num) {
		this.current_num = crrent_num;
	}

	public String getBuyer_name() {
		return buyer_name;
	}

	public void setBuyer_name(String buyer_name) {
		this.buyer_name = buyer_name;
	}

	public String getDescribe() {
		return describe;
	}

	public void setDescribe(String describe) {
		this.describe = describe;
	}

	public Date getBuy_date() {
		return buy_date;
	}

	public void setBuy_date(Date buy_date) {
		this.buy_date = buy_date;
	}

	public Date getExpire_date() {
		return expire_date;
	}

	public void setExpire_date(Date expire_date) {
		this.expire_date = expire_date;
	}

	public Date getAdd_date() {
		return add_date;
	}

	public void setAdd_date(Date add_date) {
		this.add_date = add_date;
	}

	public Date getModify_date() {
		return modify_date;
	}

	public void setModify_date(Date modify_date) {
		this.modify_date = modify_date;
	}

	public String getLog() {
		return "货物:[id=" + id + ", 名称=" + name + ", 总数=" + all_num + ", 剩余数量=" + current_num + ", 购买者=" + buyer_name
				+ ", 描述=" + describe.substring(0, 1) + "..."
				+ describe.substring(describe.length() - 2, describe.length() - 1) + "]";
	}

	@Override
	public String toString() {
		return "货物： [id=" + id + ", name=" + name + ", all_num=" + all_num + ", current_num=" + current_num
				+ ", buyer_name=" + buyer_name + ", describe=" + describe + ", buy_date=" + buy_date + ", expire_date="
				+ expire_date + "]";
	}
}
